//
//  XMGVideoTopicView.m
//  BuDeJie19
//
//  Created by hjj on 2016/12/3.
//  Copyright © 2016年 hjjuny. All rights reserved.
//

#import "XMGVideoTopicView.h"
#import "XMGTopicItem.h"
#import <UIImageView+WebCache.h>
@interface XMGVideoTopicView ()
@property (weak, nonatomic) IBOutlet UIImageView *pictureView;
@property (weak, nonatomic) IBOutlet UILabel *playCountView;
@property (weak, nonatomic) IBOutlet UILabel *timeView;

@end

@implementation XMGVideoTopicView
- (void)setItem:(XMGTopicItem *)item
{
    [super setItem:item];
    
    [_pictureView sd_setImageWithURL:[NSURL URLWithString:item.image2]];
    
    _playCountView.text = [NSString stringWithFormat:@"%@播放",item.playcount];
    
    NSInteger second = item.videotime % 60;
    NSInteger minute = item.videotime / 60;
    
    _timeView.text = [NSString stringWithFormat:@"%02ld:%02ld",minute,second];
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
